import json

import requests
import execjs

headers = {
    'Accept': 'application/json, text/plain, */*',
    'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    'Content-Type': 'text/xml;charset=UTF-8',
    'Origin': 'https://ccprec.com',
    'Pragma': 'no-cache',
    'Referer': 'https://ccprec.com/noticePic/',
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'same-origin',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
    'sec-ch-ua': '"Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
}

data = execjs.compile(open('./1.js', 'r', encoding='utf-8').read()).call("main")

data = data

response = requests.post('https://ccprec.com/honsanCloudAct', headers=headers, data=data)
# print(response.text)

res = execjs.compile(open('./1.js', 'r', encoding='utf-8').read()).call("decryptCode", response.text)

for i in json.loads(res)['results'][0]['args'][0]['list']:
    print(i['title'])